﻿using SS.Common.DBBuilder.DBDataStructure;
using SS.Net.AppGen.Generators;

namespace SS.Net.AppGen.Generatings
{
    /// <summary>
    /// The class is responsible for generating admin web pages
    /// </summary>
    public class WebGenerating: BaseGenerating
    {
        #region Constructors

        /// <summary>
        /// Constructor for retrieving database
        /// </summary>
        /// <param name="db">Data source for generating</param>
        public WebGenerating(DataBase db)
        {
            this.DB = db;
            this.Generator = new WebGenerator();
        }

        #endregion

        #region Methods

        /// <summary>
        /// Method for generating admin web pages
        /// </summary>
        public override void RequestToGenerate()
        {
            this.Generator.Generate(this.DB);
        }

        #endregion
    }
}
